package com.istock.union.user.model;

import java.io.Serializable;

public class UserCredentialInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 
     */
    private String id;

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 用户ID
     */
    private String userId;

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 机构编号
     */
    private String deptCode;

    /**
     * DECIMAL(5) 蹇呭～<br>
     * 身份类型|1:所属,2:委派
     */
    private Integer type;

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 鑾峰緱 
     */
    public String getId() {
        return id;
    }

    /**
     * VARCHAR(24) 蹇呭～<br>
     * 璁剧疆 
     */
    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 鑾峰緱 用户ID
     */
    public String getUserId() {
        return userId;
    }

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 璁剧疆 用户ID
     */
    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 鑾峰緱 机构编号
     */
    public String getDeptCode() {
        return deptCode;
    }

    /**
     * VARCHAR(50) 蹇呭～<br>
     * 璁剧疆 机构编号
     */
    public void setDeptCode(String deptCode) {
        this.deptCode = deptCode == null ? null : deptCode.trim();
    }

    /**
     * DECIMAL(5) 蹇呭～<br>
     * 鑾峰緱 身份类型|1:所属,2:委派
     */
    public Integer getType() {
        return type;
    }

    /**
     * DECIMAL(5) 蹇呭～<br>
     * 璁剧疆 身份类型|1:所属,2:委派
     */
    public void setType(Integer type) {
        this.type = type;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", userId=").append(userId);
        sb.append(", deptCode=").append(deptCode);
        sb.append(", type=").append(type);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        UserCredentialInfo other = (UserCredentialInfo) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getDeptCode() == null ? other.getDeptCode() == null : this.getDeptCode().equals(other.getDeptCode()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getDeptCode() == null) ? 0 : getDeptCode().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        return result;
    }
}